home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
AECUR102.ZIP
/
contrib
/
curses
/
src
/
savescr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-09
|
748b
|
44 lines
/*----------------------------------------------------------------------
*
* savescr.c
*
* copyright (c) 1987,88,89,90 J. Alan Eldridge
*
* save and restore an area of curscr, including cursor position
*
*----------------------------------------------------------------------
*/
#include "curses.h"
WINDOW *newwin();
WINDOW *
savescr(r,c,y,x)
{
WINDOW *win;
win = newwin(r,c,y,x);
if (win) {
overwrite(curscr, win);
getyx(curscr, y, x);
wmove(win, y, x);
}
return win;
}
void
restscr(win)
WINDOW *win;
{
int y, x;
getyx(win, y, x);
wmove(win, 0, 0);
wrefresh(win);
wmove(curscr, y, x);
mvcur(0, 0, y, x);
}